package com.zhongfl.crm.model.boss;

import com.zhongfl.crm.enums.boss.AmibaStaffRole;
import com.zhongfl.crm.enums.boss.WorkOrderSettleConfirmSettleType;
import com.zhongfl.crm.enums.boss.WorkOrderSettleConfirmStatus;
import lombok.Data;
import org.apache.commons.lang3.StringUtils;

import java.io.Serializable;
import java.util.Date;
import java.util.Objects;

/**
 * tb_work_order_settle_confirm
 */
@Data
public class WorkOrderSettleConfirm implements Serializable{
    /**
     * 自增ID
     */
    private Integer id;

    /**
     * 结算单号
     */
    private String settleNo;

    /**
     * 员工编码
     */
    private String staffCode;

    /**
     * 员工名称
     */
    private String staffName;

    /**
     * 员工角色 10巴长 20巴员
     */
    private AmibaStaffRole staffRole;

    private String staffRoleName;

    public String getStaffRoleName() {
        if (Objects.nonNull(staffRole)) {
            return staffRole.getDesc();
        }
        return StringUtils.EMPTY;
    }

    /**
     * 是否确认状态, 0待确认 1已确认
     */
    private WorkOrderSettleConfirmStatus status;

    private String statusName;

    public String getStatusName() {
        if (Objects.nonNull(status)) {
            return status.getDesc();
        }
        return StringUtils.EMPTY;
    }

    private WorkOrderSettleConfirmSettleType settleType;

    private String settleTypeName;
    public String getSettleTypeName() {
        if(Objects.nonNull(settleType)){
            return settleType.getDesc();
        }
        return StringUtils.EMPTY;
    }

    /**
     * 确认时间
     */
    private Date confirmTime;

    /**
     * 确认描述
     */
    private String remark;

    /**
     * 逻辑删除标记 0未删1已删
     */
    private Integer deleted;

    /**
     * 创建人
     */
    private String createdBy;

    /**
     * 创建时间
     */
    private Date createdTime;

    /**
     * 最后更新人
     */
    private String modifiedBy;

    /**
     * 更新时间
     */
    private Date modifiedTime;
}